package com.zust.zst.common.dto.chooselesson;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 学院、年级、专业DTO
 * @author Gavin Zhang
 * @date 2022/12/8 16:41
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ColGraMajDTO {

    @NotBlank(message = "学院名不能为空")
    private String college;

    @NotNull(message = "年级不能为空")
    @Range(min = 1980, max = 2050, message = "年份输入不能越界")
    private Integer grade;

    @NotBlank(message = "专业名不能为空")
    private String major;

    @NotNull(message = "页码不能为空")
    @Min(value = 0, message = "页数最少为0")
    private Integer page;

    @NotNull(message = "一页容量不能为空")
    @Range(min = 1, max = 50, message = "一页信息条数应在[1, 50]")
    private Integer pageSize;
}
